import { BrowserRouter as Router,Route,Redirect } from "react-router-dom"

// 导入首页和城市选择页面
import Home from "./pages/Home/home.js"
import CityList from "./pages/CityList/citylist.js"
import Map from "./pages/Map/map.js"

function App() {
  return (
    <Router>
    <div className="App">
    {/* 路由重定向 默认路由跳转到/home*/}
    <Route exact path={"/"} render={()=>(<Redirect to={"/home"}/>)}/>
    <Route path={"/home"} component={Home}/>
    <Route path={"/citylist"} component={CityList}/>
    <Route path={"/map"} component={Map}/>
    </div>
    </Router>
  );
}

export default App;
